package com.ydl.learning.flink.demo.pipeline.java.entity;

import java.util.HashMap;

/**
 *
 * @author ydl
 * @since 2022/1/6
 */
public class JobConfig {
  /**
   * 作业默认并行度
   */
  private Integer defaultParallelism = 1;
  /**
   * 作业的最大并行度
   */
  private Integer maxParallelism = 10;
  /**
   * 任务名
   */
  private String jobName;
  /**
   * 主类入参
   */
  private String programArgs;

  private HashMap<String, String> configMap = new HashMap<>();

  public Integer getDefaultParallelism() {
    return defaultParallelism;
  }

  public void setDefaultParallelism(Integer defaultParallelism) {
    this.defaultParallelism = defaultParallelism;
  }

  public Integer getMaxParallelism() {
    return maxParallelism;
  }

  public void setMaxParallelism(Integer maxParallelism) {
    this.maxParallelism = maxParallelism;
  }

  public String getJobName() {
    return jobName;
  }

  public void setJobName(String jobName) {
    this.jobName = jobName;
  }

  public String getProgramArgs() {
    return programArgs;
  }

  public void setProgramArgs(String programArgs) {
    this.programArgs = programArgs;
  }

  public void set(String key, String value) {
    this.configMap.put(key, value);
  }

  public String get(String key) {
    return this.configMap.get(key);
  }

}
